Class TestAspClass
    ' Private Members
    Dim m_PrimaryKeyName
    Dim m_Method
    Dim m_ConnectionString
    Dim m_Recordset
    
    Dim m_SqlSelect
    Dim m_SqlInsert
    Dim m_SqlUpdte
    Dim m_SqlDelete
    
    Dim m_Data

    ' Public Properties
    Public Property Get PrimaryKeyName
        PrimaryKeyName = m_PrimaryKeyName
    End Property
    Public Property Let PrimaryKeyName(val)
        m_PrimaryKeyName = val
    End Property

    Public Property Get Method
        Method = m_Method
    End Property
    Public Property Let Method(val)
        m_Method = val
    End Property
    
    Public Property Get SqlSelect
        SqlSelect = m_SqlSelect
    End Property
    Public Property Let SqlSelect(val)
        m_SqlSelect = val
    End Property
    
    Public Property Get SqlInsert
        SqlInsert = m_SqlInsert
    End Property
    Public Property Let SqlInsert(val)
        m_SqlInsert = val
    End Property
    
    Public Property Get SqlUpdate
        SqlUpdate = m_SqlUpdate
    End Property
    Public Property Let SqlUpdate(val)
        m_SqlUpdate = val
    End Property
    
    Public Property Get SqlDelete
        SqlDelete = m_SqlDelete
    End Property
    Public Property Let SqlDelete(val)
        m_SqlDelete = val
    End Property
    
    Public Property Get Data
        Set Data = m_Data
    End Property
    public Property Set Data(val)
        Set m_Data = val
    End Property


    Public Property Get ConnectionString
        ConnectionString = m_ConnectionString
    End Property
    Public Property Let ConnectionString(val)
        m_ConnectionString = val
    End Property
    
    Public Property Get Recordset
        if m_Recordset Is Nothing Then 
            Set m_Recordset = CreateObject("ADODB.Recordset")
            m_Recordset.CursorLocation = adUseClient
        End If            
        Set Recordset = m_Recordset
    End Property


    ' Executes SQL based on the Method set, and sets the Recordset up for the client.
    Public Sub Execute()
        Dim con
        Set con = CreateObject("ADODB.Connection")                  
        con.Open Me.ConnectionString      
        
        
        Me.Recordset.Open "Select * from Baps_Reports..tbl_PCardProfiles Where PCardProfileID = " & Me.Data.PCardProfileID, con, adOpenStatic, adLockReadOnly                
        Set Me.Recordset.ActiveConnection = Nothing                       
        con.Close()
        Set con = Nothing                
    End Sub

    Private Sub Class_Initialize()
        m_PrimaryKeyName = "ID"
        m_Method = ""
        m_ConnectionString = ""
        Set m_Recordset = Nothing ' Sets precident that this is to be an object pointer.
    End Sub
    Private Sub Class_Terminate()
        if not m_Recordset is Nothing then
            m_Recordset.Close 
            Set m_Recordset = Nothing
        End If
    End Sub
End Class